package com.amigo.online.provider.adv.service;


/**
 * 库存接口
 *
 * @author zxy
 */
public interface StockService {

    /**
     * @param key
     * @param hashKey
     * @param num
     * @return
     */
    public Long stock(String key, String hashKey, int num);

    /**
     * @param key
     * @param expire
     * @param num
     * @param initStock
     * @return
     */
    public long stock(String key, long expire, int num, int initStock);

    /**
     * @param key
     * @param num
     * @return
     */
    public Long stock(String key, int num);

    /**
     * @param key
     * @return
     */
    public int getStock(String key);

    /**
     * @param key
     * @param num
     * @return
     */
    public long addStock(String key, int num);

    /**
     * @param key
     * @param expire
     * @param num
     * @return
     */
    public long addStock(String key, Long expire, int num);

    /**
     * @param key
     * @param hashKey
     * @param expire
     * @param num
     * @param initStock
     * @return
     */
    public long stock(String key, String hashKey, long expire, int num, int initStock);
}
